<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<body>

<ui:composition template="/template/template.xhtml">

	<ui:define name="title">Salvar Veiculo</ui:define>

	<ui:define name="body">
		<h:form id="form">
			<h:panelGrid columns="1" width="50%">
				
					<h:panelGrid columns="3">
						<h:panelGrid>
							<h:outputLabel value="Placa:" for="placa" />
							<h:inputText id="placa" name="placa" value="#{crudVeiculo.veiculoTO.placa}"/>
						</h:panelGrid>
						<h:panelGrid>
							<h:outputLabel value="Descricao:" for="descricao" />
							<h:inputText id="descricao" name="descricao" value="#{crudVeiculo.veiculoTO.descricao}" />
						</h:panelGrid>					
						<h:panelGrid>
							<h:outputLabel value="Tipo Veiculo:" for="tipoVeiculo" />
							<h:selectOneMenu id="tipoVeiculo" value="#{crudVeiculo.veiculoTO.tipoVeiculo}" converter="simpleConvert" styleClass="tamanhoMedio">
								<f:selectItems value="#{crudVeiculo.tiposVeiculos}" />
							</h:selectOneMenu>
						</h:panelGrid>
					</h:panelGrid>
					
					<h:panelGrid columns="3">
						<h:panelGrid>
							<h:outputLabel for="cliente" value="Cliente:"></h:outputLabel>
							<h:selectOneMenu id="cliente" value="#{crudVeiculo.veiculoTO.cliente}"
								converter="simpleConvert" styleClass="tamanhoMedio">
								<f:selectItems value="#{crudVeiculo.clientes}" />
							</h:selectOneMenu>
						</h:panelGrid>
						<h:panelGrid>
							<h:outputLabel for="equipamento" value="Equipamento:"></h:outputLabel>
							<h:selectOneMenu id="cliente" value="#{crudVeiculo.veiculoTO.equipamentoSrn}" styleClass="tamanhoMedio">
								<f:selectItems value="#{crudVeiculo.equipamentos}" />
							</h:selectOneMenu>
						</h:panelGrid>						
						<h:panelGrid>
							<h:outputLabel for="status" value="Status:"></h:outputLabel>
							<h:selectOneMenu id="status" value="#{crudVeiculo.statusValue}" styleClass="tamanhoMedio">
								<f:selectItems value="#{crudVeiculo.listaStatus}" />
							</h:selectOneMenu>
						</h:panelGrid>
					</h:panelGrid>
				
				<h:commandButton value="salvar" action="#{crudVeiculo.salvar}" styleClass="button"/>

			</h:panelGrid>
		</h:form>
	</ui:define>

</ui:composition>

</body>
</html>